package com.fj.lambda;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * @author fj
 * @date 2023/12/1 17:29
 */
public class LambdaTest {
    public static void main(String[] args) {
        List<String> list = Arrays.asList("b", "a", "c");
        list.forEach(System.out::print);
        System.out.println();
        Collections.sort(list, String::compareTo);
        list.forEach(System.out::print);
        bitTest(targetName -> System.out.println("Dog bite " + targetName));
    }

    public static void bitTest(AnimalInterface animal) {
        animal.grow();
        animal.bite("张三");
    }
}
